import Vuex from 'vuex'
import Vue from 'vue'

Vue.use(Vuex)
import cart from './modules/cart'
import createPersistedState from "vuex-persistedstate"


export default new Vuex.Store({
    plugins: [createPersistedState()],
    state: {
        token: '',
        isLogin: false ,
        phone: '',
        token: '', 
    },
    getters: {},
    mutations: {
        updateLoginState(state,payload) {
            state.isLogin = payload
        },
        updatePhone(state,payload) {
            state.phone = payload
        },
        updateToken(state,payload) {
            state.token = payload
        },
    },
    actions: {},
    modules: {
       
    },

    cart
})